package com.itheima.my_reggie.common;


//  设置统一的线程存储Id类
public class ApplicationContext {
    private static ThreadLocal threadLocal = new ThreadLocal();

//  获取当前员工的Id
    public static Long getCurrentId() {
        return (Long) threadLocal.get();
    }
//存储已登录员工的Id
    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }
}
